{% extends 'index2.html'%}
{% block main %}
<div class="page-header">
    <h1>历史记录</h1>  <!--渲染"xxx"-->
</div>
<form method="get">
    <div class="input-group" style="width: 200px;">
        <input type="text" name="val" class="form-control" placeholder="关键字" value="{{search}}">
        <span class="input-group-btn">
            <button class="btn btn-default" type="submit"><span class="glyphicon glyphion-zoom-out" aria-hidden="true"><span class="glyphicon glyphicon-search"></span>&nbsp搜索</button>
        </span>
    </div>
</form>
<div><table class="table table-bordered table-hover">
    <caption>历史记录 &nbsp;&nbsp;<a href="/hadd" class="btn btn-default">添加</a></caption>
    <tr>
    
        <th>id</th>
        <th>时间</th>
        <th>数据1</th>
        <th>数据2</th>
        <th>操作</th>
    </tr>
    {%for i in bks%}
    <tr>
   
        <td>{{i.pk}}</td>
        <td>{{i.time}}</td>
        <td>{{i.da}}</td>
        <td>{{i.ta}}</td>
        <td>
        <a href="/hdel/?pk={{i.pk}}" class="btn btn-danger btn-sm">删除</a>
        <a href="/hedit/?pk={{i.pk}}" class="btn btn-info btn-sm">编辑</a></td>
     
    </tr>
    {%endfor%}
</table></div>
{% endblock %}

